/*
 * XML Type:  AbstractSyncResponse
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.AbstractSyncResponse
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML AbstractSyncResponse(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class AbstractSyncResponseImpl extends net.ofx.types.x2003.x04.impl.AbstractResponseImpl implements net.ofx.types.x2003.x04.AbstractSyncResponse
{
    
    public AbstractSyncResponseImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName TOKEN$0 = 
        new javax.xml.namespace.QName("", "TOKEN");
    private static final javax.xml.namespace.QName LOSTSYNC$2 = 
        new javax.xml.namespace.QName("", "LOSTSYNC");
    
    
    /**
     * Gets the "TOKEN" element
     */
    public java.lang.String getTOKEN()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TOKEN$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "TOKEN" element
     */
    public net.ofx.types.x2003.x04.ServerIdType xgetTOKEN()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ServerIdType target = null;
            target = (net.ofx.types.x2003.x04.ServerIdType)get_store().find_element_user(TOKEN$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "TOKEN" element
     */
    public void setTOKEN(java.lang.String token)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TOKEN$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TOKEN$0);
            }
            target.setStringValue(token);
        }
    }
    
    /**
     * Sets (as xml) the "TOKEN" element
     */
    public void xsetTOKEN(net.ofx.types.x2003.x04.ServerIdType token)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ServerIdType target = null;
            target = (net.ofx.types.x2003.x04.ServerIdType)get_store().find_element_user(TOKEN$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.ServerIdType)get_store().add_element_user(TOKEN$0);
            }
            target.set(token);
        }
    }
    
    /**
     * Gets the "LOSTSYNC" element
     */
    public net.ofx.types.x2003.x04.BooleanType.Enum getLOSTSYNC()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(LOSTSYNC$2, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.BooleanType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "LOSTSYNC" element
     */
    public net.ofx.types.x2003.x04.BooleanType xgetLOSTSYNC()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(LOSTSYNC$2, 0);
            return target;
        }
    }
    
    /**
     * True if has "LOSTSYNC" element
     */
    public boolean isSetLOSTSYNC()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(LOSTSYNC$2) != 0;
        }
    }
    
    /**
     * Sets the "LOSTSYNC" element
     */
    public void setLOSTSYNC(net.ofx.types.x2003.x04.BooleanType.Enum lostsync)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(LOSTSYNC$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(LOSTSYNC$2);
            }
            target.setEnumValue(lostsync);
        }
    }
    
    /**
     * Sets (as xml) the "LOSTSYNC" element
     */
    public void xsetLOSTSYNC(net.ofx.types.x2003.x04.BooleanType lostsync)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(LOSTSYNC$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BooleanType)get_store().add_element_user(LOSTSYNC$2);
            }
            target.set(lostsync);
        }
    }
    
    /**
     * Unsets the "LOSTSYNC" element
     */
    public void unsetLOSTSYNC()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(LOSTSYNC$2, 0);
        }
    }
}
